package com.hyzx.qbasic.admin.domain.dao;

import com.hyzx.qbasic.admin.model.po.OrgInfoPO;
import com.hyzx.qbasic.admin.model.po.OrgPO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * Created by 黄江华 on 2017/9/30
 */

public interface OrgMapper {
    List<OrgPO> getAllOrgList();

    List<OrgInfoPO> getPagedOrgList(@Param("orgName") String orgName, @Param("orgId") Integer orgId);

    int addOrg(OrgPO org);

    int deleteOrg(List<Integer> orgIdList);

    int deleteOrgUsers(List<Integer> orgIdList);

    OrgPO getOrgInfo(@Param("orgId") int orgId);

    int editOrg(OrgPO org);

    int addUserOrg(@Param("userId") int userId, @Param("orgId") int orgId);

    int deleteUserOrgs(List<Integer> userIdList);

    Integer getUserOrgId(int userId);
}
